package com.example.store2.Controller;


import com.example.store2.Service.BeAddService;
import com.example.store2.pojo.BeAdd;
import com.example.store2.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Slf4j
@RestController
@RequestMapping("/beadd")
public class BeAddController {
    @Autowired
    private BeAddService beAddService;
    @GetMapping
    public Result list(Integer id){
        log.info("访问id:{}",id);
        List<BeAdd> beAdds=beAddService.list(id);
        return Result.success(beAdds);
    }
}
